﻿#region using declarations

using System.Collections.Generic;
using DPSF;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

#endregion

namespace NGen.Managers.Particles {
	public interface IManagerParticles : IGameManager {
		bool SimulationSpeedIsEnabled { get; set; }
		bool UpdatesPerSecondIsEnabled { get; set; }
		float SimulationSpeed { get; set; }
		int UpdatesPerSecond { get; set; }
		int TotalNumberOfActiveParticles { get; }
		int TotalNumberOfParticlesBeingDrawn { get; }
		int TotalNumberOfParticlesAllocatedInMemory { get; }
		double TotalPerformanceTimeToDoUpdatesInMilliseconds { get; }
		double TotalPerformanceTimeToDoDrawsInMilliseconds { get; }
		List<IDPSFParticleSystem> ParticleSystems { get; }
		void CopyFrom(ParticleSystemManager cManagerToCopy);
		void SetSimulationSpeedForAllParticleSystems(float fSimulationSpeed);
		void SetUpdatesPerSecondForAllParticleSystems(int iUpdatesPerSecond);
		void SetPerformanceProfilingIsEnabledForAllParticleSystems(bool performanceProfilingIsEnabled);
		void SetWorldViewProjectionMatricesForAllParticleSystems(Matrix cWorld, Matrix cView, Matrix cProjection);
		void SetTransformationMatrixForAllSpriteParticleSystems(Matrix sTransformationMatrix);
		void SetCameraPositionForAllParticleSystems(Vector3 cameraPosition);
		bool ContainsParticleSystem(IDPSFParticleSystem cParticleSystemToFind);
		bool ContainsParticleSystem(int iIDOfParticleSystemToFind);
		void AddParticleSystem(IDPSFParticleSystem cParticleSystemToAdd);
		bool RemoveParticleSystem(IDPSFParticleSystem cParticleSystemToRemove);
		bool RemoveParticleSystem(int iIDOfParticleSystemToRemove);
		void RemoveAllParticleSystems();

		void AutoInitializeAllParticleSystems(GraphicsDevice cGraphicsDevice, ContentManager cContentManager, SpriteBatch cSpriteBatch);

		void DestroyAllParticleSystems();
		void DestroyAndRemoveAllParticleSystems();
		void UpdateAllParticleSystems(float fElapsedTimeInSeconds);
		void UpdateAllParticleSystemsForced(float fElapsedTimeInSeconds);
		void DrawAllParticleSystems();
		void DrawAllParticleSystemsForced();
		Texture2D DrawAllParticleSystemsToTexture(GraphicsDevice cGraphicsDevice, int iTextureWidth, int iTextureHeight);

		void DrawAllParticleSystemsAnimationToFiles(GraphicsDevice cGraphicsDevice, int iImageWidth, int iImageHeight, string sDirectoryName, float fTotalAnimationTime, float fTimeStep, bool bCreateAnimatedGIF, bool bCreateTileSetImage);
	}
}